<?php

declare(strict_types=1);
/*
 * This file is part of Leonsw.
 *
 * @link     https://leonsw.com
 * @document https://docs.leonsw.com
 * @contact  leonsw.com@gmail.com
 * @license  https://leonsw.com/LICENSE
 */
namespace App\Resource\Activity\Carnival\CharmRank;

use Illuminate\Http\Resources\Json\JsonResource;

class Resource extends JsonResource
{
    public function toArray($request)
    {
        return [
            'cover_picture'   => $this->cover_picture ?? 'https://yoyo-pros.oss-cn-hangzhou.aliyuncs.com/image/1dcd4a78ec13c7e770a74d437a225c44446c7772.jpg',
            'room_name'       => $this->room_name ?? '',
            'room_id'         => $this->room_code ?? '',
            'curr_group'      => $this->curr_group ?? null,
            'rounds'          => $this->rounds ?? null,
            'groups'          => $this->groups ?? null,
            'promotion_round' => $this->promotion_round ?? null,
            'sum_price'       => $this->sum_price ?? null,
            'promotion_group' => $this->promotion_group ?? null,
            'id'              => $this->id ?? null,
        ];
    }
}
